3.1.41 \(\int \frac {\cos (a+\frac {b}{x^2})}{x} \, dx\) [41]

Optimal. Leaf size=25 \[ -\frac {1}{2} \cos (a) \text {CosIntegral}\left (\frac {b}{x^2}\right )+\frac {1}{2} \sin (a) \text {Si}\left (\frac {b}{x^2}\right ) \]

[Out]

-1/2*Ci(b/x^2)*cos(a)+1/2*Si(b/x^2)*sin(a)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3459, 3457, 3456} \begin {gather*} \frac {1}{2} \sin (a) \text {Si}\left (\frac {b}{x^2}\right )-\frac {1}{2} \cos (a) \text {CosIntegral}\left (\frac {b}{x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b/x^2]/x,x]

[Out]

-1/2*(Cos[a]*CosIntegral[b/x^2]) + (Sin[a]*SinIntegral[b/x^2])/2

Rule 3456

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3457

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3459

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rubi steps

\begin {align*} \int \frac {\cos \left (a+\frac {b}{x^2}\right )}{x} \, dx &=\cos (a) \int \frac {\cos \left (\frac {b}{x^2}\right )}{x} \, dx-\sin (a) \int \frac {\sin \left (\frac {b}{x^2}\right )}{x} \, dx\\ &=-\frac {1}{2} \cos (a) \text {Ci}\left (\frac {b}{x^2}\right )+\frac {1}{2} \sin (a) \text {Si}\left (\frac {b}{x^2}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 24, normalized size = 0.96 \begin {gather*} \frac {1}{2} \left (-\cos (a) \text {CosIntegral}\left (\frac {b}{x^2}\right )+\sin (a) \text {Si}\left (\frac {b}{x^2}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b/x^2]/x,x]

[Out]

(-(Cos[a]*CosIntegral[b/x^2]) + Sin[a]*SinIntegral[b/x^2])/2

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 22, normalized size = 0.88

method result size
derivativedivides \(-\frac {\cosineIntegral \left (\frac {b}{x^{2}}\right ) \cos \left (a \right )}{2}+\frac {\sinIntegral \left (\frac {b}{x^{2}}\right ) \sin \left (a \right )}{2}\) \(22\)
default \(-\frac {\cosineIntegral \left (\frac {b}{x^{2}}\right ) \cos \left (a \right )}{2}+\frac {\sinIntegral \left (\frac {b}{x^{2}}\right ) \sin \left (a \right )}{2}\) \(22\)
risch \(-\frac {i {\mathrm e}^{-i a} \pi \,\mathrm {csgn}\left (\frac {b}{x^{2}}\right )}{4}+\frac {i {\mathrm e}^{-i a} \sinIntegral \left (\frac {b}{x^{2}}\right )}{2}+\frac {{\mathrm e}^{-i a} \expIntegral \left (1, -\frac {i b}{x^{2}}\right )}{4}+\frac {{\mathrm e}^{i a} \expIntegral \left (1, -\frac {i b}{x^{2}}\right )}{4}\) \(63\)
meijerg \(-\frac {\sqrt {\pi }\, \cos \left (a \right ) \left (\frac {2 \gamma -4 \ln \left (x \right )+\ln \left (b^{2}\right )}{\sqrt {\pi }}-\frac {2 \gamma }{\sqrt {\pi }}-\frac {2 \ln \left (2\right )}{\sqrt {\pi }}-\frac {2 \ln \left (\frac {b}{2 x^{2}}\right )}{\sqrt {\pi }}+\frac {2 \cosineIntegral \left (\frac {b}{x^{2}}\right )}{\sqrt {\pi }}\right )}{4}+\frac {\sinIntegral \left (\frac {b}{x^{2}}\right ) \sin \left (a \right )}{2}\) \(72\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b/x^2)/x,x,method=_RETURNVERBOSE)

[Out]

-1/2*Ci(b/x^2)*cos(a)+1/2*Si(b/x^2)*sin(a)

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.31, size = 43, normalized size = 1.72 \begin {gather*} -\frac {1}{4} \, {\left ({\rm Ei}\left (\frac {i \, b}{x^{2}}\right ) + {\rm Ei}\left (-\frac {i \, b}{x^{2}}\right )\right )} \cos \left (a\right ) - \frac {1}{4} \, {\left (i \, {\rm Ei}\left (\frac {i \, b}{x^{2}}\right ) - i \, {\rm Ei}\left (-\frac {i \, b}{x^{2}}\right )\right )} \sin \left (a\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x,x, algorithm="maxima")

[Out]

-1/4*(Ei(I*b/x^2) + Ei(-I*b/x^2))*cos(a) - 1/4*(I*Ei(I*b/x^2) - I*Ei(-I*b/x^2))*sin(a)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 29, normalized size = 1.16 \begin {gather*} -\frac {1}{4} \, {\left (\operatorname {Ci}\left (\frac {b}{x^{2}}\right ) + \operatorname {Ci}\left (-\frac {b}{x^{2}}\right )\right )} \cos \left (a\right ) + \frac {1}{2} \, \sin \left (a\right ) \operatorname {Si}\left (\frac {b}{x^{2}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x,x, algorithm="fricas")

[Out]

-1/4*(cos_integral(b/x^2) + cos_integral(-b/x^2))*cos(a) + 1/2*sin(a)*sin_integral(b/x^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos {\left (a + \frac {b}{x^{2}} \right )}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x**2)/x,x)

[Out]

Integral(cos(a + b/x**2)/x, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x,x, algorithm="giac")

[Out]

integrate(cos(a + b/x^2)/x, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \frac {\sin \left (a\right )\,\mathrm {sinint}\left (\frac {b}{x^2}\right )}{2}-\frac {\cos \left (a\right )\,\mathrm {cosint}\left (\frac {b}{x^2}\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b/x^2)/x,x)

[Out]

(sin(a)*sinint(b/x^2))/2 - (cos(a)*cosint(b/x^2))/2

________________________________________________________________________________________